import { routes } from "@/router"

export default {
    sidebar: function (routes){
        let arr = [];

        let routesArr = JSON.parse(JSON.stringify(routes))
        console.log(routes);
        routesArr.map(val=>{
            if(val.isSide){
                if(val.children){
                    val.children = sidebar(val.children)
                }
                arr.push(val)
            }
        })

        return arr
    },


}
